/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.srcptit.trainning.thompv.btvn1;
import java.util.Scanner;
/**
 *
 * @author SONY
 */
public class Bai2Muc1 {
    public static void main(String[] args)
    {
        Scanner sc= new Scanner(System.in);
        long a,b;
        a=sc.nextLong();
        b=sc.nextLong();
        while(b!=0)
        if(a>b) a=a%b;
        else
        {
            long tmp=a; a=b; b=tmp;
        }
        System.out.println("UCLN: "+a);
    }
}
